1. Field of the Invention
The invention relates to a one-chip microcomputer in which a CPU, a ROM and a RAM, are integrated in a chip, and which can access a memory or the like outside the chip.
2. Description of Related Art
A one-chip microcomputer integrates therein a CPU, memories, peripheral circuit, etc., and has various modes as well as a mode in which the one-chip microcomputer accesses only integrated circuits. Such modes includes a mode in which the one-chip microcomputer can access a memory outside the chip or the like, and that in which the one-chip microcomputer is used as an MPU.
When debugging is to take place in such a one-chip microcomputer, it is very useful in investigation of the cause of a bug to know which of an integrated ROM, an integrated RAM or an external memory is accessed by a currently executed process. In a prior art one-chip microcomputer, which of the integrated ROM, the intergrated RAM, or the external space is accessed is judged on the basis of address data fetched from an address bus of the CPU.
The one-chip microcomputer of the prior art in such a configuration has the following drawbacks. In order to judge from the outside of the chip which of the integrated ROM, the integrated RAM or and the outside of the chip is accessed, all addresses must be fetched from the address bus. An external hardware is required to identify the address space on the basis of the fetched addresses. If terminals of the address bus of the CPU are not disposed on the outside of the chip it is impossible to know from the outside during execution of a program, which of the integrated ROM, the integrated RAM or the external space is accessed.